-- gameAnalytics
-- created by zouyab
-- 游戏统计

module("GameAnalytics", package.seeall);

-- 关卡开始统计
function startLevel(level)
	if isAndroidPlatform() then
		callJavaFunc("startLevel", {level}, "(Ljava/lang/String;)V");
	end
    cclog("startLevel:"..level);
end

-- 关卡失败统计
function failLevel(level)
	if isAndroidPlatform() then
		callJavaFunc("failLevel", {level}, "(Ljava/lang/String;)V");
	end
    cclog("failLevel:"..level);
end

-- 关卡成功统计
function finishLevel(level)
	if isAndroidPlatform() then
		callJavaFunc("finishLevel", {level}, "(Ljava/lang/String;)V");
	end
    cclog("finishLevel:"..level);
end

-- 事件统计
function onEvent(eventId, value)
	if isAndroidPlatform() then
		callJavaFunc("onEvent", {eventId, value}, "(Ljava/lang/String;Ljava/lang/String;)V");
	end
    cclog("onEvent, id:"..eventId..", value:"..value);
end
